package ai.zixing.example01;

/**
 * 具体原型类
 *  实现 Cloneable 标识接口，表示当前类对象可复制
 */
public class ConcretePrototype implements Cloneable{

    public ConcretePrototype() {
        System.out.println("具体圆形对象创建成功");
    }

    @Override
    protected ConcretePrototype clone() throws CloneNotSupportedException {
        System.out.println("克隆对象复制成功");
        return (ConcretePrototype) super.clone();
    }
}
